<div class="settings_form">
<h2>Požavky na autorizaci</h2>
{% if athlete.auth_request_to.all|length_is:"0" %}
<p>Nikdo nový od vás autorizaci nechce.</p>
{% else %}
<p>
    {% if athlete.auth_request_to.all|length_is:"1" %}
    Tento člověk si chce prohlížet Vaše tréninkové záznamy
    {% else %}
    Tito lidé si chtějí prohlížet vaše tréninkové záznamy:
    {% endif %}
</p>

<dl>
{% for request in athlete.auth_request_to.all %}
    {% with request.person as person %}
    {% with person.user.username as username %}
    <dt>{{ person }}</dt>
    <dd>{{ request.message }}</dd>
    <dd>
        <a href="{% url athletelog.views.settings.friends_auth person_id=username %}" title="{{ person }} - přijmout autorizaci"><img src="/site_media/athletelog/images/icons/accept_small.png" width="16" height="16" alt="OK"></a>
        <a href="{% url athletelog.views.settings.friends_auth_reject person_id=username %}" title="{{ person }} - zamítnout autorizaci"><img src="/site_media/athletelog/images/icons/cancel_small.png" width="16" height="16" alt="Zamítnout"></a>
        <a href="{% url athletelog.views.settings.friends_block person_id=username %}" title="{{ person }} - blokovat"><img src="/site_media/athletelog/images/icons/block_small.png" width="16" height="16" alt="Blokovat"></a>
    </dd>
    {% endwith %}
    {% endwith %}
{% endfor %}
</dl>
{% endif %}
    <form action="{% url athletelog.views.settings.friends_auth_list %}?continue={{ continue|urlencode }}" method="post">
    <fieldset class="buttonSet">
        <legend class="textversion">Hotovo</legend>
        <input type="submit" name="submit_ok" class="ok button" value="Hotovo">
    </fieldset>
    </form>
</div>

